package se.liu.oschi129.game.objects;

import se.liu.oschi129.world.objects.WorldStaticObject;

/**
 * If a collision occurs between this object and an ObjectMovablePlatform then the platform will switch direction.
 * 
 * @author oschi129
 */
public class ObjectMovablePlatformCollider extends WorldStaticObject {
	
	// The vertical and horizontal speed stored in this object (transfered to the platform on collision)
	private double verticalSpeed, horizontalSpeed;
	
	/**
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 * - - - - - - - - - - - - Constructors - - - - - - - - - - - 
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 */
	
	public ObjectMovablePlatformCollider(double x, double y, double width, double height) {
		super(x,y,width,height);
		setVerticalSpeed(0);
		setHorizontalSpeed(0);
	}
	
	/**
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 * - - - - - - - - - - - Public methods - - - - - - - - - - 
	 * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
	 */
	
	/** Sets the vertical speed transfered to the platform on collision */
	public void setVerticalSpeed(double verticalSpeed) {
		this.verticalSpeed = verticalSpeed;
	}
	
	/** Sets the horizontal speed transfered to the platform on collision */
	public void setHorizontalSpeed(double horizontalSpeed) {
		this.horizontalSpeed = horizontalSpeed;
	}
	
	/** Returns the vertical speed transfered to the platform on collision */
	public double getVerticalSpeed() {
		return verticalSpeed;
	}
	
	/** Returns the horizontal speed transfered to the platform on collision */
	public double getHorizontalSpeed() {
		return horizontalSpeed;
	}

}
